//Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Text;
using Eas.WebCrawler.Interfaces;

namespace Eas.WebCrawler.Test.Interfaces {
    public class TestProcessingState : Eas.WebCrawler.Interfaces.ProcessingState{
        public int _ID;
        public Request _Request;
        public WebRequestInterface _WebRequest;
        public WebResponseInterface _WebResponse;
        public System.IO.Stream _ResponseStream;
        public bool _IsTextResponse;
        public bool _WasPaused;
        public WorkerState _WorkerState;
        public TemporaryStorage _Storage;
        

        public TestProcessingState(int id) : this(id, true, false, WorkerState.Unstarted) { }



       public TestProcessingState(int id, bool isTextResponse, bool wasPaused, WorkerState workerSate) {
            _ID = id;
            _IsTextResponse = isTextResponse;
            _WasPaused = false;
            _WorkerState = workerSate;
        }

        public TestProcessingState(int id, Request request, bool isTextResponse, System.IO.Stream stream)
            : this(id, isTextResponse, false, WorkerState.Working) {
            this._Request = request;
            this._ResponseStream = stream;
        }

        #region ProcessingState Members

        public TemporaryStorage ResponseStore{
            get{return _Storage;}
        }

        public Request Request {
            get { return _Request; }
        }

        public Eas.WebCrawler.Interfaces.WebRequestInterface WebRequest {
            get { return _WebRequest; }
        }

        public Eas.WebCrawler.Interfaces.WebResponseInterface WebResponse {
            get { return _WebResponse; }
        }

        public System.IO.Stream ResponseStream {
            get { return _ResponseStream; }
        }

        public bool IsTextResponse {
            get { return _IsTextResponse; }
        }

        public int Id {
            get { return _ID; }
        }

        public bool WasPaused {
            get { return _WasPaused; }
        }

        public Eas.WebCrawler.Interfaces.WorkerState WorkerState {
            get { return _WorkerState; }
        }

        public void RequestChange(WorkerState workerState){}
        public void CopyChangeRequests(ProcessingState state){}

        #endregion

        #region IDisposable Members

        public void Dispose() {}

        #endregion
    }
}
